<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<!-- 导入c 标签 -->
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ut-8">
<style type="text/css">
table {
	border: 1px solid red;
	border-collapse: collapse;
	width: 600px;
	text-align: center;
}

tr td {
	border: 1px solid red;
	text-align: center;
}

h2 {
	text-align: center;
}

p a {
	text-align: center;
}

span {
	text-align: center;
	width: 600px;
}
</style>
<title>分页原理</title>


</head>
<body>
	<h2>welcome</h2>



	<table align="center">
		<tr>
			<td>id</td>
			<td>姓名</td>
			<td>年龄</td>
			<td>手机</td>
		</tr>
		<c:forEach items="${list}" var="itme">
			<tr>
				<td><c:out value="${itme.id }"></c:out></td>
				<td><c:out value="${itme.name}"></c:out></td>
				<td><c:out value="${itme.age }"></c:out></td>
				<td><c:out value="${itme.phone }"></c:out></td>
			</tr>
		</c:forEach>

	</table>
	<br />
	 <a href="PageServlet?curPageNum=${pageNum-1}">上一页</a> 
	  <a href="PageServlet?curPageNum=${pageNum+1}">下一页</a> 
	<span>
	
	 <c:forEach
		var="i" begin="1" end="${count}">
		<a href="PageServlet?curPageNum=${pageNum=i}"><c:out value="${i }" /></a>
	 </c:forEach>
	
	 <input type="button"  value="跳到" onclick="PageServlet?curPageNum=${pageNum=}"/>
	第<input type="text" name="pages" size="3" id="page"/>页  &nbsp;
	 
	 共${count}页

	</span>
</body>
</html>